import request from '@/utils/request'

// {{{function_name}}}列表
export function {{{entity_name}}}Lists(params?: Record<string, any>) {
    return request.post({ url: '/{{{module_name}}}/{{{entity_snake_name}}}/list', ...params })
}

// {{{function_name}}}详情
export function {{{entity_name}}}Detail(params: Record<string, any>) {
    return request.get({ url: '/{{{module_name}}}/{{{entity_snake_name}}}/detail', params })
}

// {{{function_name}}}新增
export function {{{entity_name}}}Add(params: Record<string, any>) {
    return request.post({ url: '/{{{module_name}}}/{{{entity_snake_name}}}/add', params })
}

// {{{function_name}}}编辑
export function {{{entity_name}}}Edit(params: Record<string, any>) {
    return request.post({ url: '/{{{module_name}}}/{{{entity_snake_name}}}/edit', params })
}

// {{{function_name}}}删除
export function {{{entity_name}}}Delete(params: Record<string, any>) {
    return request.post({ url: '/{{{module_name}}}/{{{entity_snake_name}}}/del', params })
}

{% if table.is_basic_data %}
// {{{function_name}}}所有
export function {{{entity_name}}}All(params?: Record<string, any>) {
    return request.post({ url: '/{{{module_name}}}/{{{entity_snake_name}}}/all', data: params })
}
{% endif %}
